package com.yuncheng.spcyApi.spcyService;

import com.yuncheng.spcyApi.busService.BusService;
import com.yuncheng.spcyApi.entity.SpcySqsxBasic;
import com.yuncheng.spcyApi.selectXzxkApi.api.PutZwxtApi;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author hua
 */
@Component
public class SpcyTemplateService {

    private static final Logger log = LoggerFactory.getLogger(SpcyTemplateService.class);

    @Resource
    @Lazy
    private BusService busService;

    /**
     * 通用模板套用
     */
    public Map<String, String> genCommonTemplateMap(String sqsxid, SpcySqsxBasic sqsx){
        try {
            return busService.getObjectMap(sqsxid, sqsx, "");
        }catch (Exception e){
            log.error("获取通用模板套用数据-错误：{}", e.getMessage());
            return null;
        }

    }

}
